package com.qiujie.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Timestamp;

/**
 * 订餐记录实体
 */
@Data
@Accessors(chain = true)
@TableName("sys_dining_order")
@ApiModel(value = "DiningOrder对象", description = "订餐记录")
public class DiningOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("订单编号")
    @TableField("order_no")
    private String orderNo;

    @ApiModelProperty("老人的姓名和地址")
    @TableField("old_Man")
    private String oldMan;

    @ApiModelProperty("填自己的地址")
    @TableField("self")
    private String self;

    @ApiModelProperty("下单用户ID")
    @TableField("staff_id")
    private Integer staffId;

    @ApiModelProperty("老人用户ID，可能与staff_id相同")
    @TableField("elderly_staff_id")
    private Integer elderlyStaffId;

    @ApiModelProperty("菜单ID")
    @TableField("menu_id")
    private Integer menuId;

    @ApiModelProperty("餐次: 1早餐 2午餐 3晚餐")
    @TableField("meal_type")
    private Integer mealType;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty("订餐日期")
    @TableField("order_date")
    private Timestamp orderDate;

    @ApiModelProperty("状态: 0已取消 1待确认 2已确认")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("价格")
    @TableField("price")
    private int price;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private Timestamp createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty("更新时间")
    @TableField("update_time")
    private Timestamp updateTime;

    @ApiModelProperty("逻辑删除，0未删除，1删除")
    @TableField("is_deleted")
    @TableLogic
    private Integer deleteFlag;
} 